package com.songlanyun.modules.marketing.seckill.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.songlanyun.modules.account.model.vo.AccountVO;
import com.songlanyun.modules.goods.model.vo.SkuComItemVo;
import com.songlanyun.modules.marketing.seckill.entity.SeckillActivityGoods;
import com.songlanyun.modules.marketing.seckill.model.vo.SeckillActivityAppVO;
import com.songlanyun.modules.marketing.seckill.model.vo.SeckillActivityGoodsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 秒杀活动商品表
 *
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2020-11-23 17:30:11
 */
@Mapper
public interface SeckillActivityGoodsDao extends BaseMapper<SeckillActivityGoods> {

    IPage<SeckillActivityGoodsVO> goodsPage(IPage<SeckillActivityGoodsVO> page, @Param("vo") Map<String, Object> params);

    List<SeckillActivityGoodsVO> seckillingList(Long shopId);

    List<SeckillActivityGoodsVO> willSeckillList(Long shopId, Date startTime);

    SeckillActivityGoodsVO getSeckillGoodsInfo(Long id);

    boolean verifyBySerkillAndGoods(Long serkillId, Long goodsId);

    boolean verifyBySerkillGoods(Long serkillGoodsId);

    IPage<SeckillActivityGoodsVO> startFlashSalePage(IPage<SeckillActivityGoodsVO> page, @Param("startTime") String startTime, @Param("shop_id") Long shopId);

    List<SeckillActivityGoodsVO> getNowAllSeckillGoods(@Param("p") Map<String, Object> params);

    List<SeckillActivityGoods> listBySeckillId(Long seckillId);

}
